home *** CD-ROM | disk | FTP | other *** search
/ PCGUIA 2010 Software/Programs / PCGuia_programas.iso / Software / Internet / FeedDemon / FeedDemonInstall.exe / {app} / Data / Styles / Expando.fdxsl2 < prev    next >
Encoding:
Extensible Markup Language  |  2009-04-09  |  7.7 KB  |  217 lines

  1. <?xml version="1.0"?>
  2.  
  3. <xsl:stylesheet version="1.0"
  4.     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  5.     xmlns:fd="http://www.bradsoft.com/feeddemon/xmlns/1.0/">
  6.  
  7. <xsl:output method="html"
  8.     doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
  9.     doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
  10.  
  11. $INCLUDE(commonvar.inc)$
  12.  
  13. <fd:capabilities showExcerpts="false" toggleExcerpts="false" collapsePosts="true" itemGrouping="false" />
  14. <xsl:variable name="feed-type" select="newspaper/channel/@feedType"/>
  15.  
  16. <!-- language strings -->
  17. <xsl:variable name="lang_hint_open_new" select="'$LANG_CONST(S_NewsHintOpenInNewTab)$'"/>
  18. <xsl:variable name="lang_hint_enclosure" select="'$LANG_CONST(S_NewsHintEnclosure)$'"/>
  19. <xsl:variable name="lang_hint_comments" select="'$LANG_CONST(S_NewsHintComments)$'"/>
  20. <xsl:variable name="lang_hint_toggle_flag" select="'$LANG_CONST(S_NewsHintToggleFlag)$'"/>
  21. <xsl:variable name="lang_hint_addtonewsbin" select="'$LANG_CONST(S_NewsHintAddToNewsBin)$'"/>
  22.  
  23. <!-- default class for item detail - defaults to collapsed unless this is a single item newspaper -->
  24. <xsl:variable name="default-detail-class">
  25.     <xsl:choose>
  26.         <xsl:when test="$item-count=1">expanded</xsl:when>
  27.         <xsl:otherwise>collapsed</xsl:otherwise>
  28.     </xsl:choose>
  29. </xsl:variable>
  30.  
  31. <xsl:template match="newspaper">
  32.     <html>
  33.     <head>
  34.         <title>Newspaper (<xsl:value-of select="title" disable-output-escaping="yes"/>)</title>
  35.         $INCLUDE(metatrans.inc)$
  36.         <style type="text/css">
  37.             $INCLUDE(commonstyles.css)$
  38.             
  39.             body {
  40.                 font-size: $FONT-SIZE-NEWSPAPER$;
  41.                 font-family: "$FONT-NAME-NEWSPAPER$", "Trebuchet MS", Tahoma, sans-serif;
  42.                 margin: 11px;
  43.                 color: black;
  44.                 background-color: #fff;
  45.             }
  46.             
  47.             a { color: #006ABA; text-decoration: none; }
  48.             a:hover { text-decoration: underline; }        
  49.             a.notcached {
  50.                 text-decoration: none ! important;
  51.                 border-bottom: 1px dotted red ! important;
  52.             }
  53.             
  54.             kbd, code { font-size: 100%; }
  55.             #newspapertitle {
  56.                 width: 100%;
  57.                 margin-bottom: 12px;
  58.                 font-weight: bold;
  59.                 font-size: medium;
  60.                 text-align: left;
  61.             }
  62.             
  63.             div.channeltitle { font-size: larger; margin-top: 11px; margin-bottom: 5px; font-variant: small-caps; }
  64.             div.newsitemtitle {
  65.                 background-color: #edf3fe;
  66.                 border-bottom: 1px solid #DFEBFD;
  67.                 border-right: 1px solid #DFEBFD;
  68.                 padding: 2px 6px;
  69.                 padding-right: 0;
  70.                 margin-bottom: 3px;                
  71.                 text-align: left;
  72.                 width: 100%;
  73.             }
  74.           <xsl:if test="$item-count > 1">
  75.             div.newsitemtitle, img.button { cursor: pointer; }
  76.          </xsl:if>
  77.          
  78.             div.newsitemtitle, div.channeltitle { clear: both; /* prevents images in newsitemcontent to wrap over title */ }
  79.             div.newsitemcontent {
  80.                 padding: 2px 8px;
  81.                 margin-left: 37px;
  82.                 margin-top: 6px;
  83.                 margin-bottom: 12px;
  84.                 margin-right: 12px;                
  85.             }
  86.             img.icon { border: none; margin: 0 0px;}
  87.             img.button { margin-left: 5px; margin-right: 13px; }
  88.             span.nodescription { font-size: x-small; color: silver;}
  89.             .dateline { color: #6A6A6A; font-size: xx-small; margin-left: 8px; }    
  90.             .collapsed { display: none; }
  91.             .expanded {  } 
  92.             .unread { font-weight: bold; color: $COLOR-UNREAD$; }
  93.             .normal, .unread { color: #392EA4; }
  94.             .flagged { color: $COLOR-FLAGGED$; }
  95.             .sep { padding: 0 4px; }
  96.             
  97.             div.postactions {
  98.                 display: inline;
  99.             }
  100.             
  101.             div#noitems { 
  102.                 color: #9099AE; 
  103.                 margin-left: 4px;
  104.             }
  105.             #fdfocusedpost div.newsitemtitle {
  106.                 background-color: #FFFFCC;
  107.             }                
  108.         </style>
  109.         <!-- single news item newspaper -->
  110.         <xsl:if test="$item-count=1 and $newspaper-type='newsitem'">
  111.             <style type="text/css">
  112.                 body { margin: 0; }
  113.                 div.newsitemtitle { padding: 12px 22px; }
  114.                 div.newsitemcontent { margin-left: 23px; }
  115.             </style>
  116.         </xsl:if>
  117.     </head>
  118.     <body>
  119.         <xsl:variable name="folderId" select="@folderId"/>
  120.  
  121.         <xsl:if test="$newspaper-type!='newsitem'">            
  122.             <div id="newspapertitle">
  123.                 <xsl:value-of select="title" disable-output-escaping="yes"/>
  124.             </div>
  125.         </xsl:if>
  126.                 
  127.         <xsl:if test="$item-count=0">
  128.             <div id="noitems">$LANG_CONST(S_NoItemsInNewspaperFilter)$</div>
  129.         </xsl:if>
  130.                 
  131.         <xsl:for-each select="channel">
  132.             <xsl:sort select="title"/>
  133.             <xsl:variable name="groupid"><xsl:value-of select="generate-id()"/></xsl:variable>
  134.             <!-- only show channel title for folder newspaper -->
  135.             <xsl:if test="$newspaper-type='folder'">                    
  136.                 <div class="channeltitle">
  137.                     <xsl:variable name="chanlink" select="link"/>
  138.                     <a href="{$chanlink}"><xsl:value-of select="title"/></a>
  139.                 </div>
  140.             </xsl:if>
  141.             <!-- process news items -->
  142.             <xsl:for-each select="item">
  143.                 <xsl:sort select="@sortIndex" data-type="number"/>
  144.                 <xsl:apply-templates select="."/>
  145.             </xsl:for-each>
  146.         </xsl:for-each>
  147.     </body>
  148.     </html>
  149. </xsl:template>
  150.  
  151. <!-- news item template -->
  152. <xsl:template match="item">
  153.     <xsl:variable name="feedId" select="@feedId"/>
  154.     <xsl:variable name="postId" select="@postId"/>
  155.  
  156.     <xsl:variable name="itemlink" select="link"/>
  157.     <div class="fdnewsitem" name="{$feedId}:{$postId}">
  158.         <a href="fdaction:?action=togglecollapse&id={$postId}">
  159.         <div class="newsitemtitle" id="{$postId}_container">
  160.             <a href="fdaction:?action=togglecollapse&id={$postId}">
  161.                 <xsl:choose>
  162.                     <xsl:when test="$item-count > 1"><img src="$IMAGEDIR$arrowright.gif" id="{$postId}_img_expand" border="0" align="absmiddle" class="button" /></xsl:when>
  163.                     <xsl:otherwise><img src="$IMAGEDIR$arrowdown.gif" id="{$postId}_img_expand" border="0" align="absmiddle" class="button" /></xsl:otherwise>
  164.                 </xsl:choose>
  165.             </a>
  166.             
  167.             <!-- assign class based on unread/flagged state -->
  168.             <xsl:variable name="itemclass">
  169.                 <xsl:choose>
  170.                     <xsl:when test="state/@read=0 and state/@flagged!=0">unread flagged</xsl:when>
  171.                     <xsl:when test="state/@read=0">unread</xsl:when>
  172.                     <xsl:when test="state/@flagged!=0">flagged</xsl:when>
  173.                     <xsl:otherwise>normal</xsl:otherwise>
  174.                 </xsl:choose>
  175.             </xsl:variable>
  176.             <a id="{$postId}_title" href="fdaction:?action=gotopostlink&feedid={$feedId}&postid={$postId}&markpostread=1" class="{$itemclass}">
  177.                 <xsl:value-of select="title" disable-output-escaping="yes"/>
  178.             </a>
  179.             <span class="dateline" id="{$postId}_dateline">
  180.                 $INCLUDE(postactions.inc)$
  181.                 
  182.                 <xsl:if test="enclosure">
  183.                     <xsl:variable name="enclosurelink" select="enclosure/@url"/>
  184.                     <xsl:variable name="enclosuretype" select="enclosure/@type"/>
  185.                     <span class="sep">|</span>
  186.                     <a class="icon" href="fdaction:?action=downloadenclosure&feedid={$feedId}&postid={$postId}&url={$enclosurelink}" title="$LANG_CONST(S_NewsHintEnclosure)$">
  187.                         <img src="$IMAGEDIR$enclosure.gif" class="icon" align="absmiddle" />
  188.                     </a>
  189.                 </xsl:if>                            
  190.                 
  191.                 <xsl:if test="author">
  192.                     <span class="sep">|</span>
  193.                     <xsl:value-of select="author" disable-output-escaping="yes"/>
  194.                 </xsl:if>              
  195.                 <span class="sep">|</span>
  196.                 <xsl:value-of select="dateDisplay"/>
  197.                 <span class="sep">|</span>
  198.                 <xsl:if test="source and source/@htmlUrl">
  199.                     <xsl:variable name="srclink" select="source/@htmlUrl"/>
  200.                     <a href="{$srclink}"><xsl:value-of select="source"/></a>
  201.                     <span class="sep">|</span>
  202.                 </xsl:if>
  203.                 
  204.                 <a href="fdaction:?action=gotopostlink&newtab=1&feedid={$feedId}&postid={$postId}&markpostread=1" class="{$itemclass}" title="{$lang_hint_open_new}">
  205.                     <img src="$IMAGEDIR$linknew.gif" class="icon" align="absmiddle" />
  206.                 </a>
  207.                 
  208.             </span>
  209.         </div>
  210.         </a>
  211.         <div class="newsitemcontent {$default-detail-class}" id="{$postId}_group">
  212.             <xsl:value-of select="description" disable-output-escaping="yes"/>
  213.         </div>
  214.     </div>
  215. </xsl:template>
  216.  
  217. </xsl:stylesheet>